var Time = {

	now : function( )
	{
		return +new Date( );
	},
	
	toHMS : function ( ms )
	{
		var hms = [];
		hms.push( Math.floor( ms / (1000*60*60)) ); //hours
		hms.push( Math.floor( (ms % (1000*60*60)) / (1000*60) ) ); //minutes
		hms.push( Math.floor( ((ms % (1000*60*60)) % (1000*60)) / 1000 ) ); //seconds

		hms = hms.map( addZero );

		return hms.join( ":" );
	},
	
	toDate : function( unix_timestamp )
	{
		//Log.debug( 'Date timestamp '+ ms );
		if( unix_timestamp > 0 )
		{
			var d = new Date( parseInt( unix_timestamp ) );
			//Log.debug( date );
			return addZero( d.getDate( )  )+ "-"+ addZero( d.getUTCMonth( ) ) +"-"+ addZero( d.getFullYear( ) );
		}
		else
		{
			return "-";
		}
	}
}